/*
 * Copyright 2020-2025 the original author or authors.
 * You cannot use this file unless authorized by the author.
 */
package org.ipig.proc.unit;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 度量指标处理单元
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @version $$Id: MetricsUnit.java 3 2020-01-21 09:36:33Z ts <comchnts@163.com> $$
 * @since 1.0
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class MetricsUnit implements Serializable {
    //度量指标name
    private String name;
    //度量指标对应value【对于更新取变化值】
    private BigDecimal value;
    //更新增量模式，参考:DbmsOperators.UpdateIncModel
    private String incModel;

    public MetricsUnit(String name) {
        this.name = name;
    }

    public MetricsUnit(String name, BigDecimal value) {
        this.name = name;
        this.value = value;
    }
}